import Vue from 'vue';
import Router from 'vue-router';
// import Edit from '@/views/editComponent/edit';
// import Check from '@/views/editComponent/check';
import Index from '../views/index';
import Edit from '../views/Edit';
import Check from '../views/Check';
Vue.use(Router);

export const router = new Router({
  routes: [
    {
      path: '/',
      name: '',
      component: () => import('@/views/login/index'),
      meta: {
        needLogin: true,
      },
    },
    {
      path: '/checkIndex',
      component: Index,
      redirect: '/check',
      children: [
        { path: '/edit', component: Edit },
        { path: '/check', component: Check },
      ],
    },
    {
      path: '/index',
      name: 'index',
      component: () => import('@/views/login/index'),
      meta: {
        needLogin: true,
      },
    },
    {
      path: '/invitation',
      name: 'invitation',
      component: () => import('@/views/invitation/index'),
      meta: {
        needLogin: true,
      },
    },
    {
      path: '/virtuallist',
      name: 'virtuallist',
      component: () => import('@/views/virtualList/index'),
      meta: {
        needLogin: false,
      },
    },
    {
      path: '/flycloud',
      name: 'flycloud',
      component: () => import('@/views/flycloud/index'),
      meta: {
        needLogin: false,
      },
    },
    // {
    //   path: '/editComponent',
    //   name: 'editComponent',
    //   component: () => import('@/views/editComponent/index'),
    //   meta: {
    //     needLogin: false,
    //   },
    //   children: [
    //     { path: '/edit', component: Edit },
    //     { path: '/check', component: Check },
    //   ],
    // },
  ],
});
